//package com.ct.websocket1;
//
//import org.springframework.web.bind.annotation.*;
//
//import java.io.IOException;
//
//@RestController
//@RequestMapping("/ws")
//public class WebSocketController {
//    @PostMapping("/send/{uid}")
//    public String sendMessage(@PathVariable String uid, @RequestParam String message) {
//        try {
//            MyWebSocket.sendMessageToUser(uid, message);
//            return "消息已发送给 " + uid;
//        } catch (IOException e) {
//            return "发送失败：" + e.getMessage();
//        }
//    }
//}